<template>
  <NSpin
    :show="loading ?? false"
    style="--n-size: 20px"
    class="nv-crud__spin"
    content-style="pointer-events: unset;"
  >
    <slot />
  </NSpin>
</template>

<script setup lang="ts">
import { NSpin } from 'naive-ui'

defineProps<{ loading?: boolean }>()
</script>

<style scoped>
.nv-crud__spin.n-spin-container :deep(.n-spin-body) {
  left: 0;
  transform: translate(0, -50%);
}
</style>
